const app = {
    data() {
        return {
            keywords: '',
            sights: []
        }
    },
    methods: {
        search(keywords) {
            axios.post('/search', {
                pageNumber: '1',
                pageSize: '30',
                keywords: keywords,
                longitude: '116.29',
                latitude: '40.17',
                distance: 9999
            }).then(response => (this.sights = response.data.content))
                .catch(function (error) {
                    console.log(error)
                });
        }
    }, mounted() {
        this.search('');
    }
}
Vue.createApp(app).mount('#app');